<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<script src="../vue.js" type="text/javascript" charset="utf-8"></script>
	</head>
	<body>
		<div id="app">
			<button @click.once="test">触发一次</button> <br />
			<!--回车键-->
			<input type="text" @keydown.enter="testEnter"/>
		</div>
	</body>
</html>

<script type="text/javascript">
	new Vue({
		el: '#app',
		methods: {
			test() {
				alert('只触发一次');
			},
			
			testEnter() {
				alert('提交');
			}
		}
	})
	
	
</script>
